package com.stage.communication;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
/**
 * Created by Stage on 2017/3/24.
 */
public class CustomerClient {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1", 888);
            ClientInput input = new ClientInput(socket);
            Thread inputThread = new Thread(input);
            inputThread.start();
            BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            ClientRead read = new ClientRead(reader);
            Thread readThread = new Thread(read);
            readThread.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
